package xl.net
{
	public class HttpCall
	{
		private static var  _amfConnect:AmfConnect;
		private static var _httpConnect:HttpConnect = new HttpConnect();
		
		public function HttpCall()
		{
		}
		
		public static function yiiCall($controller:String,$method:String,$okCall:Function,$param:Object=null,$errorCall:Function=null):void
		{
			var httpModel:HttpModel = new HttpModel($controller,$method,$okCall,$param,$errorCall);
			_httpConnect.call(httpModel);			
		}
		
		public static function amfCall($serverClass:String,$method:String,$okCall:Function,$param:Object=null,$faultCall:Function=null):void
		{
			var amfModel:AmfModel = new AmfModel($serverClass,$method,$okCall,$param,$faultCall);
			_amfConnect.call(amfModel);
		}
	}
}